<template>
  <c-table-box ref="cTableBox" index hide-func :setting="false" :other-filters="filtersRaw" no-request :table-config="tableConfig" />
</template>
<script>
import { otherFiltersItem } from '@/utils'
export default {
  name: 'Category',
  props: {
    otc: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      tableConfig: {
        interfacePath: '/slm-admin/api/v1/designOutpicDetailTask/getCategoryNumberPageTow',
        setting: [
          {
            prop: 'areaName',
            label: '所属区域'
          },
          {
            prop: 'seriesName',
            label: '系列名称'
          },
          {
            prop: 'styleName',
            label: '所属专区'
          },
          {
            prop: 'spaceName',
            label: '所属空间'
          },
          {
            prop: 'categoryNames',
            label: '包含品类'
          },
          {
            prop: 'categoryNumber',
            label: '品类数量'
          }
        ]
      }
    }
  },
  computed: {
    filtersRaw() {
      return [
        otherFiltersItem('outpicDetailTaskCode', this.otc, '=')
      ]
    }
  },
  watch: {
    otc: {
      handler(v) {
        this.$nextTick(() => {
          this.$refs.cTableBox.initTableData()
        })
      },
      immediate: true
    }
  }
}
</script>
